//
// Created by Jisam on 2024/7/30 22:35.
// solve a
#include <bits/stdc++.h>

#define PSI pair<string,int>
#define PII pair<int,int>
#define PDI pair<double,int>
#define PDD pair<double,double>
#define VVI vector<vector<int>>
#define VI vector<int>
#define VS vector<string>

#define PQLI priority_queue<int, vector<int>, less<int>>
#define PQGI priority_queue<int, vector<int>, greater<int>>
using u32 = unsigned;
using i64 = long long;
using u64 = unsigned long long;

using namespace std;


void solve() {
    string s;
    cin >> s;
    int ok = -1;
    for(int i = 0; i < s.length()  - 1; i ++)
    {
        if(i+ 1 < s.length() &&s[i] == s[i + 1])
        {
            ok = i;
            break;
        }
    }
    if(ok != -1){
        for(int i = 0 ; i < s.length(); i ++){
            cout << s[i];
            if(i == ok) {
                char t = (s[i] - 'a' + 1 ) % 26 + 'a';
                cout << t;
            }
        }
    }else{
        char t = (s[0] - 'a' + 1 ) % 26 + 'a';
        cout << t;
        for(int i = 0 ; i < s.length(); i ++){
            cout << s[i];

        }
    }
    cout << "\n";
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int T = 1;
    cin >> T;
    while (T--) solve();
//    cout << "\n"[];
    return 0;
}